package com.atguigu.gmall.realtime.test;

import com.atguigu.gmall.realtime.app.BaseSQLApp;
import com.atguigu.gmall.realtime.util.SQLUtil;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

/**
 * @Author lzc
 * @Date 2022/5/8 21:48
 */
public class LeftJoinRead extends BaseSQLApp {
    public static void main(String[] args) {
        new LeftJoinRead().init("LeftJoinRead", 2000, 1, "LeftJoinRead");
    }
    
    @Override
    public void handle(StreamExecutionEnvironment env,
                       StreamTableEnvironment tEnv) {
       tEnv.executeSql("create table test(" +
                           " id string, " +
                           " name string," +
                           " age string, " +
                           " sex string " +
                           ")" + SQLUtil.getKafkaDDL("aaa", "test"));
       
       tEnv.sqlQuery("select * from test").execute().print();
    
    
    }
}
